Skip to content

WT-856 - Convert Other Buttons To Use Pretranslated Text#1469

Draft
dchukhin wants to merge 6 commits into
WT-856-follow-up-snippets-filtered-by-localefrom
WT-856-follow-up-pretranslated-label-for-all-button-blocks
Draft

WT-856 - Convert Other Buttons To Use Pretranslated Text#1469
dchukhin wants to merge 6 commits into
WT-856-follow-up-snippets-filtered-by-localefrom
WT-856-follow-up-pretranslated-label-for-all-button-blocks

Conversation

@dchukhin

@dchukhin dchukhin commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

One-line summary

Similar to #1449, this pull request updates all non-DownloadButton buttons to support pretranslated phrases.

Significant changes and points to review

Similar to #1250, this pull request updates all buttons:

  • a management command (called from a migration) moves all current labels into the button's custom_label field
  • buttons support a foreign key to a PretranslatedPhrase, so that Wagtail users can choose text that does not need to go to Smartling for translation

Issue / Bugzilla link

discussion: #1250 (comment)

Testing

After running migrations, view any current page with buttons, and observe that they still appear the same as before in each language (no text should be lost in any language).

Note: this pull request assumes that all current non-downloadbutton buttons' text is custom (does not match "Get Firefox" or "Download Firefox"), but in the future, any button can choose from the pretranslated phrases.

@codecov

codecov Bot commented Jun 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.45238% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.62%. Comparing base (e6dfe33) to head (f7e76b3).
⚠️ Report is 25 commits behind head on WT-856-follow-up-snippets-filtered-by-locale.

Files with missing lines Patch % Lines
...s/management/commands/migrate_all_button_labels.py 92.76% 11 Missing ⚠️
Additional details and impacted files
@@                               Coverage Diff                                @@
##           WT-856-follow-up-snippets-filtered-by-locale    #1469      +/-   ##
================================================================================
+ Coverage                                         80.39%   80.62%   +0.22%     
================================================================================
  Files                                               155      156       +1     
  Lines                                             10727    10879     +152     
================================================================================
+ Hits                                               8624     8771     +147     
- Misses                                             2103     2108       +5     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dchukhin dchukhin marked this pull request as draft June 4, 2026 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant